Characterizing Real World Bugs Causing Sequential Consistency Violations
نویسندگان
چکیده
With the ubiquitous availability of parallel architectures, the burden falls on programmers’ shoulders to write correct parallel programs that have high performance and portability across different systems. One of the major issues that complicates this task is the intricacies involved with the underlying memory consistency models. Sequential Consistency (SC) is the simplest and most intuitive memory model. Therefore, programmers usually assume SC for writing parallel programs. However, various concurrency bugs can lead to violations of SC. These subtle bugs make the program difficult to reason about and virtually always lead to incorrectness. This paper provides the first (to the best of our knowledge) comprehensive characteristics study of SC violation bugs that appear in real world codebases. We have carefully examined pattern, manifestation, effect, and fix strategy of 20 SC violation bugs. These bugs have been selected from randomly chosen 127 concurrency bugs from a variety of open source programs and libraries (e.g. Mozilla, Apache, MySQL, Gcc, Cilk, Java, and Splash2). Our study reveals interesting findings and provides useful guidance for future research in this area.
منابع مشابه
Detecting and Eliminating Potential Violation of Sequential Consistency for Concurrent C/C++ Programs
When a concurrent shared-memory program written with a sequential consistency (SC) model is run on a machine implemented with a relaxed consistency (RC) model, it could cause SC violations that are very hard to debug. To avoid such violations, programmers need to provide explicit synchronizations or insert fence instructions. In this paper, we propose a scheme to detect and eliminate potential ...
متن کاملConcolic Testing of Sequential and Concurrent Programs
Testing using manually generated test cases is the primary technique used in industry to improve reliability of software—in fact, such ad hoc testing accounts for over half of the typical cost of software development. We propose new methods for systematically and automatically testing sequential and concurrent programs. The methods are based on two new techniques: concolic testing and race-dete...
متن کاملError Invariants for Concurrent Traces
Error invariants are assertions that over-approximate the reachable program states at a given position in an error trace while only capturing states that will still lead to failure if execution of the trace is continued from that position. Such assertions reflect the effect of statements that are involved in the root cause of an error and its propagation, enabling slicing of statements that do ...
متن کاملMcPatom: A Predictive Analysis Tool for Atomicity Violation Using Model Checking
Multi-thread programs are prone to bugs due to concurrency. Concurrency bugs are hard to nd and reproduce because of the large number of interleavings. Most non-deadlock concurrency bugs are atomicity violation bugs due to unprotected accesses of shared variables by multiple threads. This paper presents a dynamic prediction tool named McPatom for predicting atomicity violation bugs involving a ...
متن کاملSCsafe: Logging Sequential Consistency Violations
Sequential Consistency Violations (SCV) in relaxed consistency machines cause programs to malfunction and are hard to debug. While there are proposals for detecting and recording SCVs, they are limited in that they end program execution after detecting the first SCV because the program is now non-SC. Therefore, they cannot be used in production runs. In addition, such proposals rely on complica...
متن کامل